package com.daocao.user.controller;


import com.daocao.common.response.DaoCaoResult;
import com.daocao.user.service.SysUserService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("sys/user")
public class UserController {

    private final SysUserService userService;

    public UserController(SysUserService userService) {
        this.userService = userService;
    }

    @GetMapping("/info")
    public DaoCaoResult searchUserInfo() {
        return DaoCaoResult.success().put("data", userService.searchUserInfo());
    }

}
